<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="close()">
        <span aria-hidden="true">×</span></button>
    <h4 class="modal-title">{{'CONFIG.DASHBOARD.PARAM'|translate}}</h4>
</div>
<div class="modal-body">
    <div class="row">
        <div class="col-md-12" ng-repeat="alert in alerts">
            <div uib-alert ng-class="'alert-' + (alert.type || 'warning')"
                 close="alerts.splice($index, 1)">{{alert.msg}}
            </div>
        </div>
    </div>
    <div class="row" style="margin-bottom: 10px">
        <div class="col-md-12 form-horizontal">
            <div class="input-group">
                <span class="input-group-addon">{{'CONFIG.DASHBOARD.PARAM_NAME'|translate}}</span>
                <input type="text" class="form-control" ng-model="param.name">
            </div>
        </div>
        <br/>
    </div>
    <div class="row" style="margin-bottom: 10px">
        <div class="col-md-5">
            <div class="cubeTree">
                <div class="title"><i class="fa fa-cube"></i><span>{{'CONFIG.DASHBOARD.CUBE_TREE'|translate}}</span></div>
                <div class="cubes">
                    <div ng-repeat="c in boardDataset">
                        <div class="cube" ng-click="foldCube(c, $event)">
                            <i class="cubeName"><img src="dist/img/arrow.png">{{c.name}}</i>
                            <span ng-repeat="v in c.columns" ng-click="add(c, v)">
                                {{v}}
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-2">
        </div>
        <div class="col-md-5">
            <div class="cubeSelected">
                <div class="title"><span>{{'CONFIG.DASHBOARD.LINKED_COLUMN'|translate}}</span></div>
                <div class="cubes">
                    <span ng-repeat="v in param.col" ng-click="deleteSelected($index)">{{'[' + v.name + '].[' + v.column + ']';}}</span>
                </div>
            </div>
        </div>
    </div>
    <div ng-switch="param.paramType">
        <div ng-switch-when="slider">
            <div ng-include="'org/cboard/view/config/board/modal/param/slider.html'"></div>
        </div>
        <div ng-switch-default>
            <div ng-include="'org/cboard/view/config/board/modal/param/selector.html'"></div>
        </div>
    </div>

</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default pull-left" data-dismiss="modal" ng-click="close()">{{'COMMON.CANCEL'|translate}}</button>
    <button type="button" class="btn btn-primary" ng-click="ok()">{{'COMMON.OK'|translate}}</button>
</div>
<div class="overlay" ng-show="status.i!=0">
    <i class="fa fa-spinner fa-spin"></i>
</div>